package com.iwhalecloud.bss.kite.cucc.client.api.shoppingcart.query;

import com.github.pagehelper.PageInfo;
import com.iwhalecloud.bss.kite.cart.client.dto.req.KiteCartQueryRequestDTO;
import com.iwhalecloud.bss.kite.client.dto.shoppingcart.ShoppingCartGroupInstDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import java.util.List;

/**
 * 购物车查询
 */
@Api(tags = "购物车查询")
public interface ICuccQueryShoppingCartService {

    @ApiOperation(value = "购物车分组统计")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "staffId", value = "员工ID", required = true),
        @ApiImplicitParam(name = "custId", value = "客户ID", required = true)
    })
    Integer getShoppingCartGroupCount(KiteCartQueryRequestDTO request);

    /**
     * 查询购物车分组
     * @param staffId 员工id
     * @param custId 客户id
     * @return
     */
    @ApiOperation(value = "查询购物车分组")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "staffId", value = "员工ID", required = true),
        @ApiImplicitParam(name = "lanId", value = "本地网ID", required = true),
        @ApiImplicitParam(name = "custId", value = "客户ID", required = true)
    })
    List<ShoppingCartGroupInstDTO> createShoppingCartGroups(String staffId, String lanId, String custId);

    /**
     * 查询简单购物车分组-只返回页面展示需要的信息
     * @return
     */
    @ApiOperation(value = "查询简单购物车分组-只返回分组信息和主商品购物项")
    List<ShoppingCartGroupInstDTO> listShoppingCartGroupInsts(KiteCartQueryRequestDTO request);


    PageInfo<ShoppingCartGroupInstDTO> listGroupInstsPage(KiteCartQueryRequestDTO request);

    /**
     * 查询简单购物车分组-只返回页面展示需要的信息-规则调用
     * @param staffId 员工id
     * @param custId 客户id
     * @return
     */
    @ApiOperation(value = "查询简单购物车分组-只返回分组信息和主产品购物项-规则调用")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "staffId", value = "员工ID", required = false),
        @ApiImplicitParam(name = "lanId", value = "本地网ID", required = true),
        @ApiImplicitParam(name = "custId", value = "客户ID", required = true)
    })
    List<ShoppingCartGroupInstDTO> createSimpleShoppingCartGroupList(String staffId, String lanId, String custId);


    /**
     * 查询购物车分组
     * @param staffId 员工id
     * @param custId 客户id
     * @return
     */
    @ApiOperation(value = "查询购物车分组")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "staffId", value = "员工ID", required = true),
        @ApiImplicitParam(name = "lanId", value = "本地网ID", required = true),
        @ApiImplicitParam(name = "custId", value = "客户ID", required = true)
    })
    List<ShoppingCartGroupInstDTO> listChargingShoppingCartGoups(String staffId, String lanId, String custId);

    /**
     * 查询购物车Id，查询不到则自动创建一个
     * @param staffId
     * @param custId
     * @return
     */
    @ApiOperation(value = "查询购物车Id，查询不到则自动创建一个")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "staffId", value = "员工ID", required = true),
        @ApiImplicitParam(name = "custId", value = "客户ID", required = true)
    })
    String getShoppingCartId(String staffId, String custId);


    /**
     * 查询简单购物车分组-只返回页面展示需要的信息
     * @return
     */
    @ApiOperation(value = "查询购物车融合商品明细")
    List<ShoppingCartGroupInstDTO> queryKiteCartDetails(String sceneInstId,String cartId, String offerId,String custId,String statusCd,String serviceOfferId);
}
